﻿///<copyright>
/// Copyright © 2009 Stephen Styrchak. All Rights Reserved.
///</copyright>
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Ferpect.ComponentModel
{
    public class GameApplication : Microsoft.Xna.Framework.Game
    {
        private GraphicsDeviceManager graphicsDeviceManager;
        private GameLoop gameLoop;
        private ScreenManager screenManager;

        public GameApplication()
        {
            this.Content.RootDirectory = "Content";

            this.graphicsDeviceManager = new GraphicsDeviceManager(this);
            this.graphicsDeviceManager.GraphicsProfile = GraphicsProfile.HiDef;
            this.gameLoop = new GameLoop(this);
            this.screenManager = new ScreenManager();

            this.Services.AddService(typeof(IGameLoop), this.gameLoop);

            this.gameLoop.AddComponent(this.screenManager);
        }
    }
}
